﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  
</head>

<body>

  <%@ include file="/WEB-INF/include/header.jsp"%>
  
  <%@ include file="/WEB-INF/include/menu.jsp"%>

  <div class="container main-content">

    <div class="panel panel-default x-panel x-panel-layout">

      <div class="panel-heading">
        <ol class="breadcrumb">
          <li><a href="${ctx.host}/content">内容管理</a></li>
          <li class="active">页面数据</li>
        </ol>
      </div>

      <div class="panel-body">

        <div class="col-xs-2 x-panel-layout-left no-horizontal-padding">
          <%@ include file="/WEB-INF/include/submenu.jsp"%>
        </div>

        <div class="col-xs-10 x-panel-layout-right">

          <div class="x-breadcrumb-wrapper">
            <div class="x-breadcrumb clearfix">
              <h2><i class="glyphicon glyphicon-fire"></i>&nbsp;&nbsp;<span>页面数据&nbsp;-&nbsp;页面列表</span></h2>
            </div>
          </div>
          
          <div class="x-toolbar-wrapper top-margin-20 clearfix">
            <div class="btn-group pull-right">
            </div>
          </div>
          
          <table class="table table-striped table-hover x-table bottom-margin-20" >
            <thead>
              <tr>
                <th>页面名称</th>
                <th>页面别名</th>
                <th>创建时间</th>
                <th class="text-center">操作</th>
              </tr>
            </thead>

            <tbody>                               
              <c:forEach var="webpage" items="${webpages}">
                <tr>
                 <td>${webpage.name}</td>
                 <td>${webpage.alias}</td>
                 <td><fmt:formatDate value="${webpage.createTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
                 <td class="text-center">
                   <a href="${ctx.host}/webpages/${webpage.id}" title="详情">详情</a>
                 </td>
                </tr>
	          </c:forEach>
            </tbody>
            
          </table>
          <div class="form-horizontal clearfix">
            
            <c:choose>
              <c:when test="${refer == 'search'}">
                <jsp:include page="/WEB-INF/include/page.jsp">
                  <jsp:param name="url" value="webpages/search" />
                  <jsp:param name="queryString" value="${queryString}" />
                </jsp:include>
              </c:when>
              <c:otherwise>
                <jsp:include page="/WEB-INF/include/page.jsp">
                  <jsp:param name="url" value="webpages" />
                  <jsp:param name="queryString" value="${queryString}" />
                </jsp:include>
              </c:otherwise>
            </c:choose>
            
          </div>
          
        </div>

      </div>
    </div>
  </div>

  <%@ include file="/WEB-INF/include/script.jsp"%>
  
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/content/webpage/webpage-list.js">
    <script type="text/javascript">
      require(['page/content/webpage/webpage-list'], function(page) {
          page.init();
      })
    </script>
  </d:resource>
  
</body>

</html>